package com.binc.testspring.controller;

import com.binc.testspring.service.HttpAPIService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 这是测试httpclient   并且是验证传与第三方接口传输文件
 */
@RestController
@RequestMapping("/test/httpClient")
public class TestHttpClientController {

    @Resource
    private HttpAPIService httpAPIService;

    @RequestMapping("/test1")
    public String test1() throws Exception {
        String str = httpAPIService.doGet("http://www.baidu.com");
        System.out.println(str);
        return "hello";

    }
}
